// 建立了对 3个子模块 的数据快捷访问

const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  // 拿到 user 模块中的 token 值
  token: state => state.user.token,
  // 拿到用户名称
  name: state => state.user.userInfo.username,
  // 拿到用户id
  userId: state => state.user.userInfo.userId,
  // 头像
  userPhoto: state => state.user.userInfo.staffPhoto,
  // 企业id
  companyId: state => state.user.userInfo.companyId,
  // 权限路由
  routes: state => state.permission.routes
}
export default getters
